<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>京东的某个商品的价格信息</title>
		<script src="js/jquery.min.js"></script>
	</head>
	<body>
		<form method="POST" method=""></form>
		<div>
			商品编号：<span id="id"></span>
		</div>
		
		<div>
			商品价格：<span id="price"></span>
		</div>
	
		</form>
		
	</body>
	<script >
		//1.实现写死的json字符串，解析展现到页面上
		//var jsonstr='[{"p":"179889.00","op":"17999.00","cb7f":"0","id":"J_100010378153","m":"100000.00"}]'
		
		
		//2.获取价格和编号
		//var obj=JSON.parse(jsonstr);//把字符串转换成js对象
		
		
		var price=obj[0].p; //获取到数组的第一条记录，访问p属性
		var id=obj[0].id;
		
		console.log(price);
		console.log(id);
		
		//3.把内容写到页面，进行展示
		$("#id").text(id);
		$("#price").text(price);
		$("#id").css("color","blue")
		$("#price").css("color","green")
	</script>
</html>